# Contributor: Anjandev Momi <anjan@momi.ca>
# Maintainer: Anjandev Momi <anjan@momi.ca>
pkgname=py3-qdldl
pkgver=0.1.5
pkgrel=3
pkgdesc="Python interface to the QDLDL free LDL factorization routine for quasi-definite linear systems: Ax = b"
url="https://github.com/osqp/qdldl-python"
arch="all !armhf !armv7 !x86" # error: cannot convert 'QDLDL_int*' {aka 'int*'} to 'const long long int*'
license="Apache-2.0"
depends="python3 py3-numpy py3-scipy"
makedepends="py3-setuptools py3-pybind11-dev python3-dev cmake"
source="qdldl-python-$pkgver.tar.gz::https://github.com/osqp/qdldl-python/archive/refs/tags/v$pkgver.post0.tar.gz
	qdldl-$pkgver.tar.gz::https://github.com/osqp/qdldl/archive/refs/tags/v$pkgver.tar.gz"
builddir="$srcdir/qdldl-python-$pkgver.post0"
options="!check" # no upstream checks

prepare() {
	default_prepare
	rmdir c/qdldl
	mv "$srcdir/qdldl-$pkgver" c/qdldl
}

build() {
	python3 setup.py build
}

package() {
	python3 setup.py install --skip-build --root="$pkgdir"
}

sha512sums="
d9552adb93c2e023cc9b0b611224e4cc6539de34b30e99d9bcf9a0e244158c4bf6cedae56d05839d8d0a2f39a105d7b0a5b2d08a3cfb3e3f9f1a4f030ee328f1  qdldl-python-0.1.5.tar.gz
3a224767708484d6728e4b0801210c5e7d4e906564c0855c7987876316cde7349c2717a169b4a6680495b0c71415be383e3e5c6826873fb92d7e93258a7a03a8  qdldl-0.1.5.tar.gz
"
